 
		 **************************************************************
		 **															 **
		 ** Paper: Freedom of Foreign Movement and Human Trafficking **
		 **														     **
		 ** Authors: Sam R. Bell & Richard W. Frank 				 **
		 **															 **
		 ** Date: May 11, 2021										 **
		 **															 **
		 ** Task: Figure 1-Trafficking sources over time			 **
		 **															 **
		 **************************************************************
 
 
		clear
		version 16.1
		set seed 1234

		** change working directory
		cd "~"
	  
		use "HTI 00-17.dta", clear
 
		sort year
		by year: egen totalcountries=count(ccode)
		label var totalcountries "Total # countries in given year"
 
		gen sourcedich=.
		replace sourcedich=1 if source>0
		label var sourcedich "Source state (dichotomous)"
	 
		sort year
		by year: egen sourcetot=count(sourcedich)
		label var sourcetot "Total # source states in a year"
	 
		gen sourcepct=sourcetot/totalcountries
		label var sourcepct "% countries in a year that are source"
 
		twoway  (line sourcepct year, sort) 
		 ,  ytitle(% of countries in sample) title(Source) 
	 

		   
 
	
	
	
	
